package 设计模式.行为型.发布订阅;

/**
 * description:
 *
 * @author 颜真明
 * @date 2024/3/12  9:55
 */
public class SubscribeB extends Subscribe{

    Publish publish;

    SubscribeB(Publish publish){
        this.publish = publish;
        publish.add(this);
    }

    @Override
    void refresh(){
        System.out.println("订阅者B 接收到最新消息更新");
    }
}
